﻿@model Eieboom.Models.AlbumModel
@using res = Sob.Resource.Views.Home.Home;
@{Eieboom.General.GeneralConfigInfo ci = ViewBag.CI as Eieboom.General.GeneralConfigInfo;} 
<script src="@Url.Content("~/Scripts/jquery.ad-gallery.js")" type="text/javascript"></script> 
@section Css{
    <link href="@Url.Content("~/Content/css/jquery.ad-gallery.css")" rel="stylesheet" type="text/css" />
}  
<div class="web_path">@res.Path：@Html.ActionLink(res.HomePage, "Index", "Home") \ @Html.Raw(Model.AlbumPath)</div>
<div class="page_wrap">
    <div class="album_view">
        <h3 class="album_title">@Model.Title</h3>
        <div class="album_time">@Model.Createdate @res.View (@Model.ViewCount) 
        @if (Model.CommentCount > 0)
        {
        <a href="#comment">@res.Comment (@Model.CommentCount)</a> 
        }
        </div>
        <div class="album_summary">@Html.Raw(Model.Description)</div>
        <div class="album_content">

            <div id="gallery" class="ad-gallery">
              <div class="ad-image-wrapper">
              </div>
              <div class="ad-controls">
              </div>
              <div class="ad-nav">
                <div class="ad-thumbs">
                  <ul class="ad-thumb-list">
                    @foreach (var item in Model.ImageList)
                    {
                        string imgsrc = item.Src;
                        //string imgpath = imgsrc.Remove(imgsrc.LastIndexOf("/"));
                        //string imgname = imgsrc.Remove(0, imgsrc.LastIndexOf("/") + 1);
                        //imgsrc = imgpath + "/300x300/" + imgname;
                        <li>
                          <a href="@item.Src">
                            <img src="@(imgsrc)" title="@item.Title" alt="@item.Alt"/>
                          </a>
                        </li>
                    }
                  </ul>
                </div>
              </div>
            </div>

        </div>
    </div>
    <div class="albumtool">
        <div class="digg albumdigg">
            <div class="digg_favor">@Model.Favor</div>
            <div class="digg_against">@Model.Against</div>
            <div class="digg_tip">@ViewBag.VoteTip</div>
        </div>
        <div class="prenextlink">@Html.Raw(ViewBag.PreNextLink)</div>
     </div>
    @Html.Action("reply", "home", new { id = Model.Id })
</div>
<div id="sidebar">
    <div class="sidebar_sub">
    <h3>@res.NewAlbums</h3>
    <div>
    @foreach (var item in ViewBag.NewAlbums as IEnumerable<Eieboom.Models.AlbumModel>)
    {
        <div class="newalbum_box">
            <div class="album_cover"><a href="@res.UrlPath/album/@(item.Id)"><img src="@(item.Cover.Src)" alt="@item.Description"/></a></div>
            <p class="album_title">
                <a href="@res.UrlPath/album/@(item.Id)">@(item.Title) (@item.ImgCount)</a>
                @if (item.CommentCount > 0)
                {   
                <a title="Comment" href="@res.UrlPath/album/@(item.Id)#comments"> @(item.CommentCount) @res.Comments</a> 
                }  
            </p>
        </div>
    }
    </div>   
    </div>
</div>
@section Js{
<script type="text/javascript">
    var ArticleId = @ViewBag.ArticleId;
    $(function () {
        /*$('img.image1').data('ad-desc', 'xxx');
        $('img.image1').data('ad-title', 'xxx');
	    $('img#001').data('ad-desc', 'xxx')*/
        var galleries = $('.ad-gallery').adGallery();
	    /*slide-hori,slide-vert,resize,fade,wild*/
        galleries[0].settings.effect = "fade";

        GetComment(1);
    });
</script> 
}